<template>
  <div>
    <div class="title">周末去哪儿</div>
    <ul>
      <li class="item border-bottom" v-for="item of  weekendList" :key="item.id">
        <div class="item-img-wapper">
          <img class="item-img" :src="item.imgUrl">
        </div>
        <div class="item-info">
          <p class="item-title">{{item.title}}</p>
          <p class="item-desc">{{item.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>
<script>
export default {
  props:{
    weekendList:{
      type:Array
    }
  },
  data() {
    return {
      // recommendList: [
      //   {
      //     id: "0001",
      //     imgUrl:
      //       "https://imgs.qunarzz.com/sight/source/1811/15/66f14e0fd6fbb.jpg_r_640x214_5d69f21d.jpg",
      //     title:
      //       "长隆野生动物世界长隆野生动物世界长隆野生动物世界长隆野生动物世界长隆野生动物世界长隆野生动物世界",
      //     desc: "熊猫三胞胎与您共享欢乐时光"
      //   },
      //   {
      //     id: "0002",
      //     imgUrl:
      //       "https://imgs.qunarzz.com/sight/source/1811/15/66f14e0fd6fbb.jpg_r_640x214_5d69f21d.jpg",
      //     title: "长隆欢乐世界",
      //     desc: "爱挑战的你怎能错过垂直过山车"
      //   },
      //   {
      //     id: "0003",
      //     imgUrl:
      //       "https://imgs.qunarzz.com/sight/source/1811/15/66f14e0fd6fbb.jpg_r_640x214_5d69f21d.jpg",
      //     title: "南沙百万葵园",
      //     desc: "记录唯美爱情，拍摄婚纱的好去处"
      //   }
      // ]
    };
  }
};
</script>
<style lang="stylus" scoped>
@import '~styles/mixins.styl';

.title {
  line-height: 0.8rem;
  background: #eee;
  text-indent: 0.2rem;
}

.item-img-wapper{
  overflow: hidden;
  height: 0;
  padding-bottom: 37.09%;
  background :red;
  .item-img {
    width: 100%;
  }
}

.item-info {
  padding: 0.1rem;

  .item-title {
    line-height: 0.54rem;
    font-size: 0.32rem;
    ellipsis();
  }

  .item-desc {
    line-height: 0.4rem;
    color: #ccc;
    ellipsis();
  }
}
</style>
